
package com.ruoyi.web.controller.lingshui.condrawing;


import java.util.ArrayList;
import java.util.List;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ruoyi.common.config.Global;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.exception.LSBusinessException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.supervise.domain.Affix;
import com.ruoyi.supervise.domain.BaseProjectInfo;
import com.ruoyi.supervise.domain.CheckConclu;
import com.ruoyi.supervise.domain.ChildTokens;
import com.ruoyi.supervise.domain.ConDrawFirstTrial;
import com.ruoyi.supervise.domain.ConDrawMajor;
import com.ruoyi.supervise.domain.ConDrawing;
import com.ruoyi.supervise.domain.ConDrawingTable;
import com.ruoyi.supervise.domain.Emphasize;
import com.ruoyi.supervise.domain.OpinionConent;
import com.ruoyi.supervise.domain.ProReviewPassRefuse;
import com.ruoyi.supervise.domain.ProsAccess;
import com.ruoyi.supervise.domain.RelatedDesignUnits;
import com.ruoyi.supervise.domain.ReviewExperts;
import com.ruoyi.supervise.domain.WDCertificateText;
import com.ruoyi.supervise.domain.WDOpinionInfo;
import com.ruoyi.supervise.domain.WDUnitProjectInfo;
import com.ruoyi.supervise.domain.WdBaseCase;
import com.ruoyi.supervise.domain.WdCertiLogInnerText;
import com.ruoyi.supervise.service.IBaseProjectInfoService;
import com.ruoyi.supervise.service.IConDrawingService;
import com.ruoyi.supervise.service.IProsAccessService;
import com.ruoyi.supervise.service.IWDCertificateInfoService;
import com.ruoyi.supervise.util.FieldStrUtils;
import com.ruoyi.supervise.util.XmlReadUtil;

import cn.hutool.core.util.StrUtil;

/**
 * @ClassName: ConDrawingController
 * @Description: 施工图审controller
 * @Author wtj
 * @DateTime 2020年3月19日 上午10:08:07
 */
@Controller
@RequestMapping("/condrawing/condrawing")
public class ConDrawingController extends BaseController{

	private String prefix = "lingshui/condrawing";
	
	private String journalPrefix = "lingshui/journal/draw";
	
	@Autowired
    private IConDrawingService conDrawingService;
	
	@Autowired
    private IProsAccessService prosAccessService;
	
	@Autowired
    private IWDCertificateInfoService wdCertificateInfoService;
	
	@Autowired
	private IBaseProjectInfoService baseProjectInfoService;
	
	@RequiresPermissions("supervise:constructionDrawingRecord:view")
	@GetMapping()
	public String conDrawing()
	{
	    return prefix + "/conDrawing";
	}
	
	/**
	 * @Title: list
	 * @Description: 查询出施工图审查table数据
	 * @Author wtj
	 * @DateTime 2020年3月23日 上午10:05:25
	 * @param conDrawingTable
	 * @return
	 */
    @RequiresPermissions("supervise:constructionDrawingRecord:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(ConDrawingTable conDrawingTable)
    {
        startPage();
        List<ConDrawingTable> conDrawingTableList=conDrawingService.selectConDrawingTableList(conDrawingTable);
        return getDataTable(conDrawingTableList);
    }
    
    /**
     * @Title: detail
     * @Description: 施工图审查申请表数据
     * @Author wtj
     * @DateTime 2020年3月23日 上午10:06:02
     * @param guid
     * @param mmap
     * @return
     */
   @RequiresPermissions("supervise:constructionDrawingRecord:apply")
   @GetMapping("/detail/{guid}")
   public String detail(@PathVariable("guid") String guid,ModelMap mmap)
   {
	   WdBaseCase wbc=conDrawingService.selectWdBaseCaseByGuid(guid);
	   mmap.put("wbc", wbc);
	   ConDrawing cd=conDrawingService.selectConDrawingByGuid(guid);
	   mmap.put("cd", cd);
	   List<WDUnitProjectInfo> wdUnitProList=conDrawingService.selectWDUnitProjectInfoByProRevGuid(guid);
	   mmap.put("wdUnitProList", wdUnitProList);
	   ProsAccess prosAccess=new ProsAccess();
	   prosAccess.setOwnerGuid(guid);
	   List<ProsAccess> paList=prosAccessService.selectProsAccessListByOwnerGuid(prosAccess);
	   mmap.put("pa", paList);
	   return prefix + "/conDrawingApply";
   }
   
   /**
    * @Title: certificateTable
    * @Description: 弹框跳转合格证编辑日志table
    * @Author wtj
    * @DateTime 2020年3月31日 上午10:37:48
    * @param guid
    * @param mmap
    * @return
    */
   @RequiresPermissions("supervise:constructionDrawingRecord:cert")
   @GetMapping("/certificateTable/{guid}")
   public String certificateTable(@PathVariable("guid") String guid,ModelMap mmap)
   {
	   mmap.put("guid", guid);
	   return prefix + "/certificateModifyLogTable";
   }
   
   @RequiresPermissions("supervise:constructionDrawingRecord:cert")
   @PostMapping("/certificateTableInfo/{guid}")
   @ResponseBody
   public TableDataInfo certificateTableInfo(@PathVariable("guid") String guid)
   {
       startPage();
       List<WdCertiLogInnerText> clit = wdCertificateInfoService.selectWdCertiLogByProReviewGuid(guid);
       return getDataTable(clit);
   }
   
   @RequiresPermissions("supervise:constructionDrawingRecord:cert")
   @GetMapping("/detailCertificate/{guid}")
   public String detailCertificate(@PathVariable("guid") String guid,ModelMap mmap)
   {
	   WDCertificateText wdct = wdCertificateInfoService.selectWDCertificateTextByGuid(guid);
	   mmap.put("wdct", wdct);
	   ConDrawing conDrawing = wdCertificateInfoService.selectProjectGuidByGuid(guid);
	   if(conDrawing!=null) {
		   BaseProjectInfo baseProjectInfo = baseProjectInfoService.selectBaseProjectInfoByGuid(conDrawing.getProjectGuid());
		   mmap.put("baseProjectInfo", baseProjectInfo);
		   WdBaseCase wbc=conDrawingService.selectWdBaseCaseByGuid(conDrawing.getGuid());
		   mmap.put("wbc", wbc);
	   }else {
		   mmap.put("baseProjectInfo", null);
		   mmap.put("wbc", null);
	   }
	   return prefix+"/detailCertificate";
   }
   
   @RequiresPermissions("supervise:constructionDrawingRecord:cert")
   @GetMapping("/wdCertificate/{id}")
   public String wdCertificate(@PathVariable("id") String id,ModelMap mmap)
   {
	   WDCertificateText wdct = wdCertificateInfoService.selectWDCertificateInfoTxtByCerfiNumber(id);
	   mmap.put("wdct", wdct);
	   ConDrawing conDrawing = wdCertificateInfoService.selectProjectGuidByCerfiNumber(id);
	   if(conDrawing!=null) {
		   BaseProjectInfo baseProjectInfo = baseProjectInfoService.selectBaseProjectInfoByGuid(conDrawing.getProjectGuid());
		   mmap.put("baseProjectInfo", baseProjectInfo);
		   WdBaseCase wbc=conDrawingService.selectWdBaseCaseByGuid(conDrawing.getGuid());
		   mmap.put("wbc", wbc);
	   }else {
		   mmap.put("baseProjectInfo", null);
		   mmap.put("wbc", null);
	   }
	   return prefix+"/detailCertificate";
   }
   
   @RequiresPermissions("supervise:constructionDrawingRecord:draw")
   @GetMapping("/drawing/{guid}")
   public String drawing(@PathVariable("guid") String guid,ModelMap mmap)
   {
	   ProsAccess prosAccess=new ProsAccess();
	   prosAccess.setOwnerGuid(guid);
	   //建筑图纸
	   prosAccess.setAcceId("建筑施工图");
	   ProsAccess jz = prosAccessService.selectProsAccessByOwnerGuid(prosAccess);
	   if(jz!=null) {
		   String[] subStr=StrUtil.split(jz.getAcceName(), "|");
		   if(subStr.length == 4) {
			   jz.setAcceName(Global.getConfig("ruoyi.bigPlatform")+subStr[1]);
		   }else {
			   jz.setAcceName(null);
		   }
	   }
	   mmap.put("jz", jz);
	   //暖通图纸
	   prosAccess.setAcceId("暖通施工图");
	   ProsAccess nt = prosAccessService.selectProsAccessByOwnerGuid(prosAccess);
	   if(nt!=null) {
		   String[] subStr=StrUtil.split(nt.getAcceName(), "|");
		   if(subStr.length == 4) {
			   nt.setAcceName(Global.getConfig("ruoyi.bigPlatform")+subStr[1]);
		   }else {
			   nt.setAcceName(null);
		   }
	   }
	   mmap.put("nt", nt);
	   //结构图纸
	   prosAccess.setAcceId("结构施工图");
	   ProsAccess jg = prosAccessService.selectProsAccessByOwnerGuid(prosAccess);
	   if(jg!=null) {
		   String[] subStr=StrUtil.split(jg.getAcceName(), "|");
		   if(subStr.length == 4) {
			   jg.setAcceName(Global.getConfig("ruoyi.bigPlatform")+subStr[1]);
		   }else {
			   jg.setAcceName(null);
		   }
	   }
	   mmap.put("jg", jg);
	   //燃气图纸
	   prosAccess.setAcceId("燃气");
	   ProsAccess rq = prosAccessService.selectProsAccessByOwnerGuid(prosAccess);
	   if(rq!=null) {
		   String[] subStr=StrUtil.split(rq.getAcceName(), "|");
		   if(subStr.length == 4) {
			   rq.setAcceName(Global.getConfig("ruoyi.bigPlatform")+subStr[1]);
		   }else {
			   rq.setAcceName(null);
		   }
	   }
	   mmap.put("rq", rq);
	   //给排水图纸
	   prosAccess.setAcceId("给排水施工图");
	   ProsAccess gps = prosAccessService.selectProsAccessByOwnerGuid(prosAccess);
	   if(gps!=null) {
		   String[] subStr=StrUtil.split(gps.getAcceName(), "|");
		   if(subStr.length == 4) {
			   gps.setAcceName(Global.getConfig("ruoyi.bigPlatform")+subStr[1]);
		   }else {
			   gps.setAcceName(null);
		   }
	   }
	   mmap.put("gps", gps);
	   //其他图纸
	   prosAccess.setAcceId("其他施工图纸");
	   ProsAccess qt = prosAccessService.selectProsAccessByOwnerGuid(prosAccess);
	   if(qt!=null) {
		   String[] subStr=StrUtil.split(qt.getAcceName(), "|");
		   if(subStr.length == 4) {
			   qt.setAcceName(Global.getConfig("ruoyi.bigPlatform")+subStr[1]);
		   }else {
			   qt.setAcceName(null);
		   }
	   }
	   mmap.put("qt", qt);
	   //电气图纸
	   prosAccess.setAcceId("电气施工图");
	   ProsAccess dq = prosAccessService.selectProsAccessByOwnerGuid(prosAccess);
	   if(dq!=null) {
		   String[] subStr=StrUtil.split(dq.getAcceName(), "|");
		   if(subStr.length == 4) {
			   dq.setAcceName(Global.getConfig("ruoyi.bigPlatform")+subStr[1]);
		   }else {
			   dq.setAcceName(null);
		   }
	   }
	   mmap.put("dq", dq);
	   return prefix+"/drawing";
   }
   
   @GetMapping("/drawJournal/{guid}")
   public String journal(@PathVariable("guid") String guid,ModelMap mmap)
   {
	   ConDrawing cd=conDrawingService.selectWdWorkDrawingByGuid(guid);
	   if(StringUtils.isNull(cd)) {
		   throw new LSBusinessException("数据获取不正确，请确认选择的是否正确");
	   }
	   mmap.put("guid", guid);
	   mmap.put("projectName", cd.getProjectName());
	   return journalPrefix + "/drawJournal";
   }
   
   /**
    * @Title: drawJournal
    * @Description: 施工图审查日志列表获取数据
    * @Author wtj
    * @DateTime 2020-9-15 16:39:27
    * @param dataGuid
    * @return
    */
   @RequiresPermissions("supervise:constructionDrawingRecord:log")
   @PostMapping("/drawJournal/{dataGuid}")
   @ResponseBody
   public TableDataInfo drawJournal(@PathVariable("dataGuid") String dataGuid)
   {
	   startPage();
	   return getDataTable(conDrawingService.selectWDOpinionInfoByDataGuid(dataGuid));
   }
   
   /**
    * @Title: surResultJournalDetadil
    * @Description: 日志详情接口
    * @Author wtj
    * @DateTime 2020-11-5 10:34:29
    * @param guid
    * @param mmap
    * @return
    */
   @RequiresPermissions("supervise:constructionDrawingRecord:log")
   @GetMapping("/drawJournalDetadil/{guid}")
   public String surResultJournalDetadil(@PathVariable("guid") String guid,ModelMap mmap)
   {
	   WDOpinionInfo wdoi = conDrawingService.selectWDOpinionInfoByGuid(guid);
	   if(StringUtils.isNull(wdoi)) {
		   throw new LSBusinessException("数据获取不正确，请确认选择的是否正确");
	   }
	   mmap.put("wdoi", wdoi);
	   ConDrawing cd=conDrawingService.selectConDrawingByGuid(wdoi.getDataGuid());
	   if(StringUtils.isNull(cd)) {
		   throw new LSBusinessException("数据获取不正确，请确认选择的是否正确");
	   }
	   mmap.put("cd", cd);
	   Emphasize e = new Emphasize();
	   e.setGuid("Guid");
	   e.setItemNo("ItemNo");
	   e.setStandardNo("StandardNo");
	   e.setProfessional("Professional");
	   e.setUnitEngineeringInfoGuid("UnitEngineeringInfoGuid");
	   e.setEnabled("Enabled");
	   OpinionConent oc = new OpinionConent();
	   oc.setGuid("Guid");
	   oc.setDescription("Description");
	   oc.setReplyConclusion("ReplyConclusion");
	   oc.setReplyOpinion("ReplyOpinion");
	   oc.setExpertConclusion("ExpertConclusion");
	   oc.setExpertOpinion("ExpertOpinion");
	   oc.setExpertName("ExpertName");
	   oc.setExpertGuid("ExpertGuid");
	   oc.setReplyExpertGuid("ReplyExpertGuid");
	   oc.setReplyExpertName("ReplyExpertName");
	   oc.setUnitEngineeringInfoGuid("UnitEngineeringInfoGuid");
	   Affix a = new Affix();
       a.setGuid("Guid");
       a.setAcceName("AcceName");
       a.setAcceId("AcceId");
       a.setOperator("Operator");
       a.setCreateDate("CreateDate");
       a.setCategoryID("CategoryID");
       a.setOwnerGuid("OwnerGuid");
       a.setSortID("SortID");
       a.setCopy("Copy");
       a.setLatestCopy("LatestCopy");
       ReviewExperts re = new ReviewExperts();
	   re.setGuid("Guid");
	   re.setName("Name");
	   re.setSex("Sex");
	   re.setPhone("Phone");
	   re.setTitles("Titles");
	   re.setProfessional("Professional");
	   re.setLoginID("LoginID");
	   re.setWorkCompany("WorkCompany");
	   re.setTaskGuid("TaskGuid");
	   re.setNewExpertGuid("NewExpertGuid");
	   re.setNewExpertName("NewExpertName");
	   CheckConclu cc= new CheckConclu();
	   cc.setName("OperatorName");
	   cc.setConclusion("Conclusion");
	   ConDrawMajor cdm = new ConDrawMajor();
	   cdm.setMajor("GroupName");
	   if("程序性审查退回".equals(wdoi.getRole()) || "程序性审查通过".equals(wdoi.getRole())) {
		   //图审的没有no序号，要自己生成
		   ProReviewPassRefuse prpr = conDrawingService.ProReviewPassRefuseDetail(guid);
		   mmap.put("prpr", prpr);
		   return journalPrefix + "/proceduralReview";
		   //页面已接入
	   }else if("指定审查人员".equals(wdoi.getRole()) && "程序性审查通过".equals(wdoi.getState())) {
		   //一般只拿审查人员，变更后人员这两个字段
		   String nodePath = "/PsDataPacket/FDataList/ReviewExpert";
		   List<ReviewExperts> reList = XmlReadUtil.getReviewExpertsXml(wdoi.getReviewExperts(), nodePath, re);
		   mmap.put("reList", reList);
		   return journalPrefix + "/firstDesignateDreviewers";
		   //页面已接入
	   }else if("指定审查人员".equals(wdoi.getRole()) && "整改后重新上报".equals(wdoi.getState())) {
		   String nodePath = "/PsDataPacket/FDataList/ReviewExpert";
		   List<ReviewExperts> reList = XmlReadUtil.getReviewExpertsXml(wdoi.getReviewExperts(), nodePath, re);
		   mmap.put("reList", reList);
		   return journalPrefix + "/firstDesignateDreviewers";
		   //页面未接入
	   }else if("审查人员初审".equals(wdoi.getRole()) && StrUtil.containsIgnoreCase(wdoi.getState(), "专家初审")) {
		   List<ConDrawFirstTrial> cdftList = ConDrawFirstTrialEntity(cd.getProjectGuid(),cd);
		   //违反强制性条文
		   List<Emphasize> emphasizeList = XmlReadUtil.getEmphasizeXml(wdoi.getEmphasizeList(), "/PsDataPacket/FDataList/Emphasize", "OpinionConent", e, oc);
		   //违反一般规范条文
		   List<Emphasize> generalCommentList = XmlReadUtil.getEmphasizeXml(wdoi.getGeneralComment(), "/PsDataPacket/FDataList/Emphasize", "OpinionConent", e, oc);
		   //其它意见
		   List<OpinionConent> finalCommentList = XmlReadUtil.getOpinionConentXml(wdoi.getFinalComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
		   //抗震专项意见
		   List<OpinionConent> seismicCommentList = XmlReadUtil.getOpinionConentXml(wdoi.getSeismicComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
		   //节能及太阳能专项审查意见
		   List<OpinionConent> specialCommentList = XmlReadUtil.getOpinionConentXml(wdoi.getSpecialComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
		   //绿色建筑审查意见
		   List<OpinionConent> greenCommentList = XmlReadUtil.getOpinionConentXml(wdoi.getGreenComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
		   for(ConDrawFirstTrial cdft:cdftList) {
			   List<Emphasize> emphasizeListNew = new ArrayList<Emphasize>();
			   List<Emphasize> generalCommentListNew = new ArrayList<Emphasize>();
			   List<OpinionConent> finalCommentListNew = new ArrayList<OpinionConent>();
			   List<OpinionConent> seismicCommentListNew = new ArrayList<OpinionConent>();
			   List<OpinionConent> specialCommentListNew = new ArrayList<OpinionConent>();
			   List<OpinionConent> greenCommentListNew = new ArrayList<OpinionConent>();
			   //封装违反强制性条文
			   for(Emphasize emphasize:emphasizeList) {
				   if(cdft.getGuid().equals(emphasize.getUnitEngineeringInfoGuid())) {
					   for(OpinionConent opinionConent:emphasize.getOpinionConent()) {
						   if(StrUtil.containsIgnoreCase(opinionConent.getDescription(), "(整改)")) {
							   opinionConent.setNote("整改");
						   }
					   }
					   emphasizeListNew.add(emphasize);
				   }
			   }
			   cdft.setEmphasizeList(emphasizeListNew);
			   //封装违反一般规范条文
			   for(Emphasize generalComment:generalCommentList) {
				   if(cdft.getGuid().equals(generalComment.getUnitEngineeringInfoGuid())) {
					   for(OpinionConent opinionConent:generalComment.getOpinionConent()) {
						   if(StrUtil.containsIgnoreCase(opinionConent.getDescription(), "(整改)")) {
							   opinionConent.setNote("整改");
						   }
					   }
					   generalCommentListNew.add(generalComment);
				   }
			   }
			   cdft.setGeneralCommentList(generalCommentListNew);
			   //封装其他意见
			   for(OpinionConent opinionConent:finalCommentList) {
				   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
					   finalCommentListNew.add(opinionConent);
				   }
			   }
			   cdft.setFinalCommentList(finalCommentListNew);
			   //封装抗震专项意见
			   for(OpinionConent opinionConent:seismicCommentList) {
				   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
					   seismicCommentListNew.add(opinionConent);
				   }
			   }
			   cdft.setSeismicCommentList(seismicCommentListNew);
			   //节能及太阳能专项审查意见
			   for(OpinionConent opinionConent:specialCommentList) {
				   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
					   specialCommentListNew.add(opinionConent);
				   }
			   }
			   cdft.setSpecialCommentList(specialCommentListNew);
			   //绿色建筑审查意见
			   for(OpinionConent opinionConent:greenCommentList) {
				   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
					   greenCommentListNew.add(opinionConent);
				   }
			   }
			   cdft.setGreenCommentList(greenCommentListNew);
		   }
		   mmap.put("cdftList", cdftList);
		   return journalPrefix + "/firstTrial";
		   //页面已接入
		   //不需要第一次修改
	   }else if("技术负责人审查退回".equals(wdoi.getRole()) && ("审查人员初审".equals(wdoi.getState()) || StrUtil.containsIgnoreCase(wdoi.getState(), "专家初审"))) {
		   List<ConDrawMajor> cdmCheckList = new ArrayList<ConDrawMajor>();
		   //审查人员审查意见开始
		   List<WDOpinionInfo> wdoiedList = conDrawingService.selectWDOpinionInfoByPGuid(wdoi.getGuid());
		   for(WDOpinionInfo wdOpinionInfo:wdoiedList) {
			   WDOpinionInfo wdoied = conDrawingService.selectWDOpinionInfoByGuid(wdOpinionInfo.getGuid());
			   if(StringUtils.isNull(wdoied)) {
				   throw new LSBusinessException("数据获取不正确，请确认选择的是否正确");
			   }
			   ConDrawing cded=conDrawingService.selectConDrawingByGuid(wdoied.getDataGuid());
			   if(StringUtils.isNull(cded)) {
				   throw new LSBusinessException("数据获取不正确，请确认选择的是否正确");
			   }
			   //该条审查人员审查数据的单位工程封装实体
			   List<ConDrawFirstTrial> cdftList = ConDrawFirstTrialEntity(cded.getProjectGuid(),cded);
			   ConDrawMajor cdmCheck = new ConDrawMajor();
			   cdmCheck.setMajor(wdOpinionInfo.getExperProfessional());
			   //审查人员审查意见开始
			   //审查人员审查违反强制性条文
			   List<Emphasize> checkEmphasizeList = XmlReadUtil.getEmphasizeXml(wdOpinionInfo.getEmphasizeList(), "/PsDataPacket/FDataList/Emphasize", "OpinionConent", e, oc);
			   //审查人员审查违反一般规范条文
			   List<Emphasize> checkGeneralCommentList = XmlReadUtil.getEmphasizeXml(wdOpinionInfo.getGeneralComment(), "/PsDataPacket/FDataList/Emphasize", "OpinionConent", e, oc);
			   //审查人员审查其它意见
			   List<OpinionConent> checkFinalCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getFinalComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   //审查人员审查抗震专项意见
			   List<OpinionConent> checkSeismicCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getSeismicComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   //审查人员审查节能及太阳能专项审查意见
			   List<OpinionConent> checkSpecialCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getSpecialComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   //审查人员审查绿色建筑审查意见
			   List<OpinionConent> checkGreenCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getGreenComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   for(ConDrawFirstTrial cdft:cdftList) {
				   List<Emphasize> checkEmphasizeListNew = new ArrayList<Emphasize>();
				   List<Emphasize> checkGeneralCommentListNew = new ArrayList<Emphasize>();
				   List<OpinionConent> checkFinalCommentListNew = new ArrayList<OpinionConent>();
				   List<OpinionConent> checkSeismicCommentListNew = new ArrayList<OpinionConent>();
				   List<OpinionConent> checkSpecialCommentListNew = new ArrayList<OpinionConent>();
				   List<OpinionConent> checkGreenCommentListNew = new ArrayList<OpinionConent>();
				 //封装审查人员审查违反强制性条文
				   for(Emphasize emphasize:checkEmphasizeList) {
					   if(cdft.getGuid().equals(emphasize.getUnitEngineeringInfoGuid())) {
						   for(OpinionConent opinionConent:emphasize.getOpinionConent()) {
							   if(StrUtil.containsIgnoreCase(opinionConent.getDescription(), "(整改)")) {
								   opinionConent.setNote("整改");
							   }
						   }
						   checkEmphasizeListNew.add(emphasize);
					   }
				   }
				   //cdft.setCheckEmphasizeList(checkEmphasizeListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckEmphasizeList())) {
					   for(Emphasize checkEmphasize:checkEmphasizeListNew) {
						   cdft.getCheckEmphasizeList().add(checkEmphasize);
					   }
				   }else if(StringUtils.isEmpty(cdft.getCheckEmphasizeList())) {
					   cdft.setCheckEmphasizeList(checkEmphasizeListNew);
				   }
				   //封装审查人员审查违反一般规范条文
				   for(Emphasize generalComment:checkGeneralCommentList) {
					   if(cdft.getGuid().equals(generalComment.getUnitEngineeringInfoGuid())) {
						   for(OpinionConent opinionConent:generalComment.getOpinionConent()) {
							   if(StrUtil.containsIgnoreCase(opinionConent.getDescription(), "(整改)")) {
								   opinionConent.setNote("整改");
							   }
						   }
						   checkGeneralCommentListNew.add(generalComment);
					   }
				   }
				   //cdft.setCheckGeneralCommentList(checkGeneralCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckGeneralCommentList())) {
					   for(Emphasize checkGeneralComment:checkGeneralCommentListNew) {
						   cdft.getCheckGeneralCommentList().add(checkGeneralComment);
					   }
				   }else if(StringUtils.isEmpty(cdft.getCheckGeneralCommentList())) {
					   cdft.setCheckGeneralCommentList(checkGeneralCommentListNew);
				   }
				   //封装审查人员审查其他意见
				   for(OpinionConent opinionConent:checkFinalCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkFinalCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckFinalCommentList(checkFinalCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckFinalCommentList())) {
					   for(OpinionConent checkFinalComment:checkFinalCommentListNew) {
						   cdft.getCheckFinalCommentList().add(checkFinalComment);
					   }
				   }else if(StringUtils.isEmpty(cdft.getCheckFinalCommentList())) {
					   cdft.setCheckFinalCommentList(checkFinalCommentListNew);
				   }
				   //封装审查人员审查抗震专项意见
				   for(OpinionConent opinionConent:checkSeismicCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkSeismicCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckSeismicCommentList(checkSeismicCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckSeismicCommentList())) {
					   for(OpinionConent checkSeismicComment:checkSeismicCommentListNew) {
						   cdft.getCheckSeismicCommentList().add(checkSeismicComment);
					   }
				   }else if(StringUtils.isEmpty(cdft.getCheckSeismicCommentList())) {
					   cdft.setCheckSeismicCommentList(checkSeismicCommentListNew);
				   }
				   //封装审查人员审查节能及太阳能专项审查意见
				   for(OpinionConent opinionConent:checkSpecialCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkSpecialCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckSpecialCommentList(checkSpecialCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckSpecialCommentList())) {
					   for(OpinionConent checkSpecialComment:checkSpecialCommentListNew) {
						   cdft.getCheckSpecialCommentList().add(checkSpecialComment);
					   }
				   }else if(StringUtils.isEmpty(cdft.getCheckSpecialCommentList())) {
					   cdft.setCheckSpecialCommentList(checkSpecialCommentListNew);
				   }
				   //封装审查人员审查绿色建筑审查意见
				   for(OpinionConent opinionConent:checkGreenCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkGreenCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckGreenCommentList(checkGreenCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckGreenCommentList())) {
					   for(OpinionConent checkGreenComment:checkGreenCommentListNew) {
						   cdft.getCheckGreenCommentList().add(checkGreenComment);
					   }
				   }else if(StringUtils.isEmpty(cdft.getCheckGreenCommentList())) {
					   cdft.setCheckGreenCommentList(checkGreenCommentListNew);
				   }
			   }
			   cdmCheck.setCdftList(cdftList);
			   packageConDrawMajor(cdmCheckList, cdmCheck);
		   }
		   //审查人员审查意见结束
		   //技术负责人审核意见开始
		   String nodePath = "/PsDataPacket/FDataList/WDGroupOpinion";
		   String emphasizeNodePath = "/Emphasize";
		   String generalCommentNodePath = "/GeneralComment/FDataList/Emphasize";
		   String finalCommentNodePath = "/FinalComment/FDataList/OpinionItem";
		   String seismicCommentNodePath = "/SeismicComment/FDataList/OpinionItem";
		   String specialCommentNodePath = "/SpecialComment/FDataList/OpinionItem";
		   String greenCommentNodePath = "/GreenComment/FDataList/OpinionItem";
		   String affixNodePath = "/Affixs/FDataList/Accessories";
		   List<ConDrawFirstTrial> cdftList = ConDrawFirstTrialEntity(cd.getProjectGuid(),cd);
		   List<ConDrawMajor> cdmList = XmlReadUtil.getTecPassReturnXml(wdoi.getGroupOpinions(), nodePath, emphasizeNodePath, generalCommentNodePath, finalCommentNodePath, seismicCommentNodePath, specialCommentNodePath, greenCommentNodePath, affixNodePath, cdm, cdftList, oc, e, a);
		   //技术负责人审核意见结束
		   //开始整合审查人员审查意见和技术负责人审核意见
		   List<ConDrawMajor> conDrawMajorList = ConDrawMajorEntity(cdmList, cdmCheckList);
		   mmap.put("conDrawMajorList", conDrawMajorList);
		   return journalPrefix + "/reviewReturn";
		   //页面已接入
		   //第一次修改完毕
		   //第二次修改完毕
	   }else if("技术负责人审查通过".equals(wdoi.getRole()) && ("审查人员初审".equals(wdoi.getState()) || StrUtil.containsIgnoreCase(wdoi.getState(), "专家初审"))) {
		   List<ConDrawMajor> cdmCheckList = new ArrayList<ConDrawMajor>();
		   //审查人员审查意见开始
		   List<WDOpinionInfo> wdoiedList = conDrawingService.selectWDOpinionInfoByPGuid(wdoi.getGuid());
		   for(WDOpinionInfo wdOpinionInfo:wdoiedList) {
			   WDOpinionInfo wdoied = conDrawingService.selectWDOpinionInfoByGuid(wdOpinionInfo.getGuid());
			   if(StringUtils.isNull(wdoied)) {
				   throw new LSBusinessException("数据获取不正确，请确认选择的是否正确");
			   }
			   ConDrawing cded=conDrawingService.selectConDrawingByGuid(wdoied.getDataGuid());
			   if(StringUtils.isNull(cded)) {
				   throw new LSBusinessException("数据获取不正确，请确认选择的是否正确");
			   }
			   //该条审查人员审查数据的单位工程封装实体
			   List<ConDrawFirstTrial> cdftList = ConDrawFirstTrialEntity(cded.getProjectGuid(),cded);
			   ConDrawMajor cdmCheck = new ConDrawMajor();
			   cdmCheck.setMajor(wdOpinionInfo.getExperProfessional());
			   //审查人员审查意见开始
			   //审查人员审查违反强制性条文
			   List<Emphasize> checkEmphasizeList = XmlReadUtil.getEmphasizeXml(wdOpinionInfo.getEmphasizeList(), "/PsDataPacket/FDataList/Emphasize", "OpinionConent", e, oc);
			   //审查人员审查违反一般规范条文
			   List<Emphasize> checkGeneralCommentList = XmlReadUtil.getEmphasizeXml(wdOpinionInfo.getGeneralComment(), "/PsDataPacket/FDataList/Emphasize", "OpinionConent", e, oc);
			   //审查人员审查其它意见
			   List<OpinionConent> checkFinalCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getFinalComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   //审查人员审查抗震专项意见
			   List<OpinionConent> checkSeismicCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getSeismicComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   //审查人员审查节能及太阳能专项审查意见
			   List<OpinionConent> checkSpecialCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getSpecialComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   //审查人员审查绿色建筑审查意见
			   List<OpinionConent> checkGreenCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getGreenComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   for(ConDrawFirstTrial cdft:cdftList) {
				   List<Emphasize> checkEmphasizeListNew = new ArrayList<Emphasize>();
				   List<Emphasize> checkGeneralCommentListNew = new ArrayList<Emphasize>();
				   List<OpinionConent> checkFinalCommentListNew = new ArrayList<OpinionConent>();
				   List<OpinionConent> checkSeismicCommentListNew = new ArrayList<OpinionConent>();
				   List<OpinionConent> checkSpecialCommentListNew = new ArrayList<OpinionConent>();
				   List<OpinionConent> checkGreenCommentListNew = new ArrayList<OpinionConent>();
				 //封装审查人员审查违反强制性条文
				   for(Emphasize emphasize:checkEmphasizeList) {
					   if(cdft.getGuid().equals(emphasize.getUnitEngineeringInfoGuid())) {
						   for(OpinionConent opinionConent:emphasize.getOpinionConent()) {
							   if(StrUtil.containsIgnoreCase(opinionConent.getDescription(), "(整改)")) {
								   opinionConent.setNote("整改");
							   }
						   }
						   checkEmphasizeListNew.add(emphasize);
					   }
				   }
				   //cdft.setCheckEmphasizeList(checkEmphasizeListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckEmphasizeList())) {
					   for(Emphasize checkEmphasize:checkEmphasizeListNew) {
						   cdft.getCheckEmphasizeList().add(checkEmphasize);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckEmphasizeList())) {
					   cdft.setCheckEmphasizeList(checkEmphasizeListNew);
					}
				   //封装审查人员审查违反一般规范条文
				   for(Emphasize generalComment:checkGeneralCommentList) {
					   if(cdft.getGuid().equals(generalComment.getUnitEngineeringInfoGuid())) {
						   for(OpinionConent opinionConent:generalComment.getOpinionConent()) {
							   if(StrUtil.containsIgnoreCase(opinionConent.getDescription(), "(整改)")) {
								   opinionConent.setNote("整改");
							   }
						   }
						   checkGeneralCommentListNew.add(generalComment);
					   }
				   }
				   //cdft.setCheckGeneralCommentList(checkGeneralCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckGeneralCommentList())) {
					   for(Emphasize checkGeneralComment:checkGeneralCommentListNew) {
						   cdft.getCheckGeneralCommentList().add(checkGeneralComment);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckGeneralCommentList())) {
					   cdft.setCheckGeneralCommentList(checkGeneralCommentListNew);
					}
				   //封装审查人员审查其他意见
				   for(OpinionConent opinionConent:checkFinalCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkFinalCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckFinalCommentList(checkFinalCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckFinalCommentList())) {
					   for(OpinionConent checkFinalComment:checkFinalCommentListNew) {
						   cdft.getCheckFinalCommentList().add(checkFinalComment);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckFinalCommentList())) {
					   cdft.setCheckFinalCommentList(checkFinalCommentListNew);
					}
				   //封装审查人员审查抗震专项意见
				   for(OpinionConent opinionConent:checkSeismicCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkSeismicCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckSeismicCommentList(checkSeismicCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckSeismicCommentList())) {
					   for(OpinionConent checkSeismicComment:checkSeismicCommentListNew) {
						   cdft.getCheckSeismicCommentList().add(checkSeismicComment);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckSeismicCommentList())) {
					   cdft.setCheckSeismicCommentList(checkSeismicCommentListNew);
					}
				   //封装审查人员审查节能及太阳能专项审查意见
				   for(OpinionConent opinionConent:checkSpecialCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkSpecialCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckSpecialCommentList(checkSpecialCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckSpecialCommentList())) {
					   for(OpinionConent checkSpecialComment:checkSpecialCommentListNew) {
						   cdft.getCheckSpecialCommentList().add(checkSpecialComment);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckSpecialCommentList())) {
					   cdft.setCheckSpecialCommentList(checkSpecialCommentListNew);
					}
				   //封装审查人员审查绿色建筑审查意见
				   for(OpinionConent opinionConent:checkGreenCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkGreenCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckGreenCommentList(checkGreenCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckGreenCommentList())) {
					   for(OpinionConent checkGreenComment:checkGreenCommentListNew) {
						   cdft.getCheckGreenCommentList().add(checkGreenComment);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckGreenCommentList())) {
					   cdft.setCheckGreenCommentList(checkGreenCommentListNew);
					}
			   }
			   cdmCheck.setCdftList(cdftList);
			   packageConDrawMajor(cdmCheckList, cdmCheck);
		   }
		   //审查人员审查意见结束
		   //技术负责人审核意见开始
		   String nodePath = "/PsDataPacket/FDataList/WDGroupOpinion";
		   String emphasizeNodePath = "/Emphasize";
		   String generalCommentNodePath = "/GeneralComment/FDataList/Emphasize";
		   String finalCommentNodePath = "/FinalComment/FDataList/OpinionItem";
		   String seismicCommentNodePath = "/SeismicComment/FDataList/OpinionItem";
		   String specialCommentNodePath = "/SpecialComment/FDataList/OpinionItem";
		   String greenCommentNodePath = "/GreenComment/FDataList/OpinionItem";
		   String affixNodePath = "/Affix/FDataList/Accessories";
		   List<ConDrawFirstTrial> cdftList = ConDrawFirstTrialEntity(cd.getProjectGuid(),cd);
		   List<ConDrawMajor> cdmList = XmlReadUtil.getTecPassReturnXml(wdoi.getGroupOpinions(), nodePath, emphasizeNodePath, generalCommentNodePath, finalCommentNodePath, seismicCommentNodePath, specialCommentNodePath, greenCommentNodePath, affixNodePath, cdm, cdftList, oc, e, a);
		   //技术负责人审核意见结束
		   //开始整合审查人员审查意见和技术负责人审核意见
		   List<ConDrawMajor> conDrawMajorList = ConDrawMajorEntity(cdmList, cdmCheckList);
		   mmap.put("conDrawMajorList", conDrawMajorList);
		   return journalPrefix + "/reviewReturn";
		   //页面已接入
		   //第一次修改完毕
		   //第二次修改完毕
	   }else if("技术性整改上报".equals(wdoi.getRole())) {
		   String nodePath = "/PsDataPacket/FDataList/WDGroupOpinion";
		   String emphasizeNodePath = "/Emphasize";
		   String generalCommentNodePath = "/GeneralComment/FDataList/Emphasize";
		   String finalCommentNodePath = "/FinalComment/FDataList/OpinionItem";
		   String seismicCommentNodePath = "/SeismicComment/FDataList/OpinionItem";
		   String specialCommentNodePath = "/SpecialComment/FDataList/OpinionItem";
		   String greenCommentNodePath = "/GreenComment/FDataList/OpinionItem";
		   String affixNodePath = "/Affixs/FDataList/Accessories";
		   List<ConDrawFirstTrial> cdftList = ConDrawFirstTrialEntity(cd.getProjectGuid(),cd);
		   List<ConDrawMajor> cdmNewList = XmlReadUtil.getTecPassReturnXml(wdoi.getGroupOpinions(), nodePath, emphasizeNodePath, generalCommentNodePath, finalCommentNodePath, seismicCommentNodePath, specialCommentNodePath, greenCommentNodePath, affixNodePath, cdm, cdftList, oc, e, a);
		   List<ConDrawMajor> cdmList = filePath(cdmNewList);
		   mmap.put("cdmList", cdmList);
		   return journalPrefix + "/technicalRectification";
		   //页面已接入
		   //无需第一次修改
	   }else if("技术负责人审查退回".equals(wdoi.getRole()) && ("审查人员复审".equals(wdoi.getState()) || StrUtil.containsIgnoreCase(wdoi.getState(), "专家复审") || "整改后直接使用".equals(wdoi.getState())) ) {
		   List<ConDrawMajor> cdmCheckList = new ArrayList<ConDrawMajor>();
		   //审查人员审查意见开始
		   List<WDOpinionInfo> wdoiedList = conDrawingService.selectWDOpinionInfoByPGuid(wdoi.getGuid());
		   for(WDOpinionInfo wdOpinionInfo:wdoiedList) {
			   WDOpinionInfo wdoied = conDrawingService.selectWDOpinionInfoByGuid(wdOpinionInfo.getGuid());
			   if(StringUtils.isNull(wdoied)) {
				   throw new LSBusinessException("数据获取不正确，请确认选择的是否正确");
			   }
			   ConDrawing cded=conDrawingService.selectConDrawingByGuid(wdoied.getDataGuid());
			   if(StringUtils.isNull(cded)) {
				   throw new LSBusinessException("数据获取不正确，请确认选择的是否正确");
			   }
			   //该条审查人员审查数据的单位工程封装实体
			   List<ConDrawFirstTrial> cdftList = ConDrawFirstTrialEntity(cded.getProjectGuid(),cded);
			   ConDrawMajor cdmCheck = new ConDrawMajor();
			   cdmCheck.setMajor(wdOpinionInfo.getExperProfessional());
			   //审查人员审查意见开始
			   //审查人员审查违反强制性条文
			   List<Emphasize> checkEmphasizeList = XmlReadUtil.getEmphasizeXml(wdOpinionInfo.getEmphasizeList(), "/PsDataPacket/FDataList/Emphasize", "OpinionConent", e, oc);
			   //审查人员审查违反一般规范条文
			   List<Emphasize> checkGeneralCommentList = XmlReadUtil.getEmphasizeXml(wdOpinionInfo.getGeneralComment(), "/PsDataPacket/FDataList/Emphasize", "OpinionConent", e, oc);
			   //审查人员审查其它意见
			   List<OpinionConent> checkFinalCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getFinalComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   //审查人员审查抗震专项意见
			   List<OpinionConent> checkSeismicCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getSeismicComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   //审查人员审查节能及太阳能专项审查意见
			   List<OpinionConent> checkSpecialCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getSpecialComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   //审查人员审查绿色建筑审查意见
			   List<OpinionConent> checkGreenCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getGreenComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   for(ConDrawFirstTrial cdft:cdftList) {
				   List<Emphasize> checkEmphasizeListNew = new ArrayList<Emphasize>();
				   List<Emphasize> checkGeneralCommentListNew = new ArrayList<Emphasize>();
				   List<OpinionConent> checkFinalCommentListNew = new ArrayList<OpinionConent>();
				   List<OpinionConent> checkSeismicCommentListNew = new ArrayList<OpinionConent>();
				   List<OpinionConent> checkSpecialCommentListNew = new ArrayList<OpinionConent>();
				   List<OpinionConent> checkGreenCommentListNew = new ArrayList<OpinionConent>();
				 //封装审查人员审查违反强制性条文
				   for(Emphasize emphasize:checkEmphasizeList) {
					   if(cdft.getGuid().equals(emphasize.getUnitEngineeringInfoGuid())) {
						   for(OpinionConent opinionConent:emphasize.getOpinionConent()) {
							   if(StrUtil.containsIgnoreCase(opinionConent.getDescription(), "(整改)")) {
								   opinionConent.setNote("整改");
							   }
						   }
						   checkEmphasizeListNew.add(emphasize);
					   }
				   }
				   //cdft.setCheckEmphasizeList(checkEmphasizeListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckEmphasizeList())) {
					   for(Emphasize checkEmphasize:checkEmphasizeListNew) {
						   cdft.getCheckEmphasizeList().add(checkEmphasize);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckEmphasizeList())) {
					   cdft.setCheckEmphasizeList(checkEmphasizeListNew);
					}
				   //封装审查人员审查违反一般规范条文
				   for(Emphasize generalComment:checkGeneralCommentList) {
					   if(cdft.getGuid().equals(generalComment.getUnitEngineeringInfoGuid())) {
						   for(OpinionConent opinionConent:generalComment.getOpinionConent()) {
							   if(StrUtil.containsIgnoreCase(opinionConent.getDescription(), "(整改)")) {
								   opinionConent.setNote("整改");
							   }
						   }
						   checkGeneralCommentListNew.add(generalComment);
					   }
				   }
				   //cdft.setCheckGeneralCommentList(checkGeneralCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckGeneralCommentList())) {
					   for(Emphasize checkGeneralComment:checkGeneralCommentListNew) {
						   cdft.getCheckGeneralCommentList().add(checkGeneralComment);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckGeneralCommentList())) {
					   cdft.setCheckGeneralCommentList(checkGeneralCommentListNew);
					}
				   //封装审查人员审查其他意见
				   for(OpinionConent opinionConent:checkFinalCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkFinalCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckFinalCommentList(checkFinalCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckFinalCommentList())) {
					   for(OpinionConent checkFinalComment:checkFinalCommentListNew) {
						   cdft.getCheckFinalCommentList().add(checkFinalComment);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckFinalCommentList())) {
					   cdft.setCheckFinalCommentList(checkFinalCommentListNew);
					}
				   //封装审查人员审查抗震专项意见
				   for(OpinionConent opinionConent:checkSeismicCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkSeismicCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckSeismicCommentList(checkSeismicCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckSeismicCommentList())) {
					   for(OpinionConent checkSeismicComment:checkSeismicCommentListNew) {
						   cdft.getCheckSeismicCommentList().add(checkSeismicComment);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckSeismicCommentList())) {
					   cdft.setCheckSeismicCommentList(checkSeismicCommentListNew);
					}
				   //封装审查人员审查节能及太阳能专项审查意见
				   for(OpinionConent opinionConent:checkSpecialCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkSpecialCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckSpecialCommentList(checkSpecialCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckSpecialCommentList())) {
					   for(OpinionConent checkSpecialComment:checkSpecialCommentListNew) {
						   cdft.getCheckSpecialCommentList().add(checkSpecialComment);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckSpecialCommentList())) {
					   cdft.setCheckSpecialCommentList(checkSpecialCommentListNew);
					}
				   //封装审查人员审查绿色建筑审查意见
				   for(OpinionConent opinionConent:checkGreenCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkGreenCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckGreenCommentList(checkGreenCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckGreenCommentList())) {
					   for(OpinionConent checkGreenComment:checkGreenCommentListNew) {
						   cdft.getCheckGreenCommentList().add(checkGreenComment);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckGreenCommentList())) {
					   cdft.setCheckGreenCommentList(checkGreenCommentListNew);
					}
			   }
			   cdmCheck.setCdftList(cdftList);
			   packageConDrawMajor(cdmCheckList, cdmCheck);
		   }
		   //审查人员审查意见结束
		   //技术负责人审核意见开始
		   String nodePath = "/PsDataPacket/FDataList/WDGroupOpinion";
		   String emphasizeNodePath = "/Emphasize";
		   String generalCommentNodePath = "/GeneralComment/FDataList/Emphasize";
		   String finalCommentNodePath = "/FinalComment/FDataList/OpinionItem";
		   String seismicCommentNodePath = "/SeismicComment/FDataList/OpinionItem";
		   String specialCommentNodePath = "/SpecialComment/FDataList/OpinionItem";
		   String greenCommentNodePath = "/GreenComment/FDataList/OpinionItem";
		   String affixNodePath = "/Affixs/FDataList/Accessories";
		   List<ConDrawFirstTrial> cdftList = ConDrawFirstTrialEntity(cd.getProjectGuid(),cd);
		   List<ConDrawMajor> cdmList = XmlReadUtil.getTecPassReturnXml(wdoi.getGroupOpinions(), nodePath, emphasizeNodePath, generalCommentNodePath, finalCommentNodePath, seismicCommentNodePath, specialCommentNodePath, greenCommentNodePath, affixNodePath, cdm, cdftList, oc, e, a);
		   //技术负责人审核意见结束
		   //开始整合审查人员审查意见和技术负责人审核意见
		   List<ConDrawMajor> conDrawMajoroldList = ConDrawMajorEntity(cdmList, cdmCheckList);
		   List<ConDrawMajor> conDrawMajorList = filePath(conDrawMajoroldList);
		   mmap.put("conDrawMajorList", conDrawMajorList);
		   return journalPrefix + "/reviewApproved";
		   //页面已接入
		   //第一次修改完毕
		   //第二次修改完毕
	   }else if("技术负责人审查通过".equals(wdoi.getRole()) && ("审查人员复审".equals(wdoi.getState()) || StrUtil.containsIgnoreCase(wdoi.getState(), "专家复审") || "整改后直接使用".equals(wdoi.getState())) ) {
		   List<ConDrawMajor> cdmCheckList = new ArrayList<ConDrawMajor>();
		   //审查人员审查意见开始
		   List<WDOpinionInfo> wdoiedList = conDrawingService.selectWDOpinionInfoByPGuid(wdoi.getGuid());
		   for(WDOpinionInfo wdOpinionInfo:wdoiedList) {
			   WDOpinionInfo wdoied = conDrawingService.selectWDOpinionInfoByGuid(wdOpinionInfo.getGuid());
			   if(StringUtils.isNull(wdoied)) {
				   throw new LSBusinessException("数据获取不正确，请确认选择的是否正确");
			   }
			   ConDrawing cded=conDrawingService.selectConDrawingByGuid(wdoied.getDataGuid());
			   if(StringUtils.isNull(cded)) {
				   throw new LSBusinessException("数据获取不正确，请确认选择的是否正确");
			   }
			   //该条审查人员审查数据的单位工程封装实体
			   List<ConDrawFirstTrial> cdftList = ConDrawFirstTrialEntity(cded.getProjectGuid(),cded);
			   ConDrawMajor cdmCheck = new ConDrawMajor();
			   cdmCheck.setMajor(wdOpinionInfo.getExperProfessional());
			   //审查人员审查意见开始
			   //审查人员审查违反强制性条文
			   List<Emphasize> checkEmphasizeList = XmlReadUtil.getEmphasizeXml(wdOpinionInfo.getEmphasizeList(), "/PsDataPacket/FDataList/Emphasize", "OpinionConent", e, oc);
			   //审查人员审查违反一般规范条文
			   List<Emphasize> checkGeneralCommentList = XmlReadUtil.getEmphasizeXml(wdOpinionInfo.getGeneralComment(), "/PsDataPacket/FDataList/Emphasize", "OpinionConent", e, oc);
			   //审查人员审查其它意见
			   List<OpinionConent> checkFinalCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getFinalComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   //审查人员审查抗震专项意见
			   List<OpinionConent> checkSeismicCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getSeismicComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   //审查人员审查节能及太阳能专项审查意见
			   List<OpinionConent> checkSpecialCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getSpecialComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   //审查人员审查绿色建筑审查意见
			   List<OpinionConent> checkGreenCommentList = XmlReadUtil.getOpinionConentXml(wdOpinionInfo.getGreenComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
			   for(ConDrawFirstTrial cdft:cdftList) {
				   List<Emphasize> checkEmphasizeListNew = new ArrayList<Emphasize>();
				   List<Emphasize> checkGeneralCommentListNew = new ArrayList<Emphasize>();
				   List<OpinionConent> checkFinalCommentListNew = new ArrayList<OpinionConent>();
				   List<OpinionConent> checkSeismicCommentListNew = new ArrayList<OpinionConent>();
				   List<OpinionConent> checkSpecialCommentListNew = new ArrayList<OpinionConent>();
				   List<OpinionConent> checkGreenCommentListNew = new ArrayList<OpinionConent>();
				 //封装审查人员审查违反强制性条文
				   for(Emphasize emphasize:checkEmphasizeList) {
					   if(cdft.getGuid().equals(emphasize.getUnitEngineeringInfoGuid())) {
						   for(OpinionConent opinionConent:emphasize.getOpinionConent()) {
							   if(StrUtil.containsIgnoreCase(opinionConent.getDescription(), "(整改)")) {
								   opinionConent.setNote("整改");
							   }
						   }
						   checkEmphasizeListNew.add(emphasize);
					   }
				   }
				   //cdft.setCheckEmphasizeList(checkEmphasizeListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckEmphasizeList())) {
					   for(Emphasize checkEmphasize:checkEmphasizeListNew) {
						   cdft.getCheckEmphasizeList().add(checkEmphasize);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckEmphasizeList())) {
					   cdft.setCheckEmphasizeList(checkEmphasizeListNew);
					}
				   //封装审查人员审查违反一般规范条文
				   for(Emphasize generalComment:checkGeneralCommentList) {
					   if(cdft.getGuid().equals(generalComment.getUnitEngineeringInfoGuid())) {
						   for(OpinionConent opinionConent:generalComment.getOpinionConent()) {
							   if(StrUtil.containsIgnoreCase(opinionConent.getDescription(), "(整改)")) {
								   opinionConent.setNote("整改");
							   }
						   }
						   checkGeneralCommentListNew.add(generalComment);
					   }
				   }
				   //cdft.setCheckGeneralCommentList(checkGeneralCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckGeneralCommentList())) {
					   for(Emphasize checkGeneralComment:checkGeneralCommentListNew) {
						   cdft.getCheckGeneralCommentList().add(checkGeneralComment);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckGeneralCommentList())) {
					   cdft.setCheckGeneralCommentList(checkGeneralCommentListNew);
					}
				   //封装审查人员审查其他意见
				   for(OpinionConent opinionConent:checkFinalCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkFinalCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckFinalCommentList(checkFinalCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckFinalCommentList())) {
					   for(OpinionConent checkFinalComment:checkFinalCommentListNew) {
						   cdft.getCheckFinalCommentList().add(checkFinalComment);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckFinalCommentList())) {
					   cdft.setCheckFinalCommentList(checkFinalCommentListNew);
					}
				   //封装审查人员审查抗震专项意见
				   for(OpinionConent opinionConent:checkSeismicCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkSeismicCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckSeismicCommentList(checkSeismicCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckSeismicCommentList())) {
					   for(OpinionConent checkSeismicComment:checkSeismicCommentListNew) {
						   cdft.getCheckSeismicCommentList().add(checkSeismicComment);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckSeismicCommentList())) {
					   cdft.setCheckSeismicCommentList(checkSeismicCommentListNew);
					}
				   //封装审查人员审查节能及太阳能专项审查意见
				   for(OpinionConent opinionConent:checkSpecialCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkSpecialCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckSpecialCommentList(checkSpecialCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckSpecialCommentList())) {
					   for(OpinionConent checkSpecialComment:checkSpecialCommentListNew) {
						   cdft.getCheckSpecialCommentList().add(checkSpecialComment);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckSpecialCommentList())) {
					   cdft.setCheckSpecialCommentList(checkSpecialCommentListNew);
					}
				   //封装审查人员审查绿色建筑审查意见
				   for(OpinionConent opinionConent:checkGreenCommentList) {
					   if(cdft.getGuid().equals(opinionConent.getUnitEngineeringInfoGuid())) {
						   checkGreenCommentListNew.add(opinionConent);
					   }
				   }
				   //cdft.setCheckGreenCommentList(checkGreenCommentListNew);
				   if(StringUtils.isNotEmpty(cdft.getCheckGreenCommentList())) {
					   for(OpinionConent checkGreenComment:checkGreenCommentListNew) {
						   cdft.getCheckGreenCommentList().add(checkGreenComment);
					   }
					}else if(StringUtils.isEmpty(cdft.getCheckGreenCommentList())) {
					   cdft.setCheckGreenCommentList(checkGreenCommentListNew);
					}
			   }
			   cdmCheck.setCdftList(cdftList);
			   packageConDrawMajor(cdmCheckList, cdmCheck);
		   }
		   //审查人员审查意见结束
		   //技术负责人审核意见开始
		   String nodePath = "/PsDataPacket/FDataList/WDGroupOpinion";
		   String emphasizeNodePath = "/Emphasize";
		   String generalCommentNodePath = "/GeneralComment/FDataList/Emphasize";
		   String finalCommentNodePath = "/FinalComment/FDataList/OpinionItem";
		   String seismicCommentNodePath = "/SeismicComment/FDataList/OpinionItem";
		   String specialCommentNodePath = "/SpecialComment/FDataList/OpinionItem";
		   String greenCommentNodePath = "/GreenComment/FDataList/OpinionItem";
		   String affixNodePath = "/Affixs/FDataList/Accessories";
		   List<ConDrawFirstTrial> cdftList = ConDrawFirstTrialEntity(cd.getProjectGuid(),cd);
		   List<ConDrawMajor> cdmList = XmlReadUtil.getTecPassReturnXml(wdoi.getGroupOpinions(), nodePath, emphasizeNodePath, generalCommentNodePath, finalCommentNodePath, seismicCommentNodePath, specialCommentNodePath, greenCommentNodePath, affixNodePath, cdm, cdftList, oc, e, a);
		   //技术负责人审核意见结束
		   //开始整合审查人员审查意见和技术负责人审核意见
		   List<ConDrawMajor> conDrawMajoroldList = ConDrawMajorEntity(cdmList, cdmCheckList);
		   List<ConDrawMajor> conDrawMajorList = filePath(conDrawMajoroldList);
		   mmap.put("conDrawMajorList", conDrawMajorList);
		   return journalPrefix + "/reviewApproved";
		   //页面已接入
		   //第一次修改完毕
		   //第二次修改完毕
	   }else if("审查人员复审".equals(wdoi.getRole()) || StrUtil.containsIgnoreCase(wdoi.getState(), "专家复审")) {
		   //上次审查意见开始
		   String nodePath = "/PsDataPacket/FDataList/WDGroupOpinion";
		   String emphasizeNodePath = "/Emphasize";
		   String generalCommentNodePath = "/GeneralComment/FDataList/Emphasize";
		   String finalCommentNodePath = "/FinalComment/FDataList/OpinionItem";
		   String seismicCommentNodePath = "/SeismicComment/FDataList/OpinionItem";
		   String specialCommentNodePath = "/SpecialComment/FDataList/OpinionItem";
		   String greenCommentNodePath = "/GreenComment/FDataList/OpinionItem";
		   String affixNodePath = "/Affixs/FDataList/Accessories";
		   List<ConDrawFirstTrial> cdftList = ConDrawFirstTrialEntity(cd.getProjectGuid(),cd);
		   List<ConDrawMajor> cdmList = XmlReadUtil.getTecPassReturnXml(wdoi.getGroupOpinions(), nodePath, emphasizeNodePath, generalCommentNodePath, finalCommentNodePath, seismicCommentNodePath, specialCommentNodePath, greenCommentNodePath, affixNodePath, cdm, cdftList, oc, e, a);
		   List<ConDrawMajor> cdmNewList = filePath(cdmList);
		   ConDrawMajor conDrawMajor = cdmNewList.get(0);
		   //上次审查意见结束
		   //本次审查意见开始
		   //违反强制性条文
		   List<Emphasize> emphasizeList = XmlReadUtil.getEmphasizeXml(wdoi.getEmphasizeList(), "/PsDataPacket/FDataList/Emphasize", "OpinionConent", e, oc);
		   //违反一般规范条文
		   List<Emphasize> generalCommentList = XmlReadUtil.getEmphasizeXml(wdoi.getGeneralComment(), "/PsDataPacket/FDataList/Emphasize", "OpinionConent", e, oc);
		   //其它意见
		   List<OpinionConent> finalCommentList = XmlReadUtil.getOpinionConentXml(wdoi.getFinalComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
		   //抗震专项意见
		   List<OpinionConent> seismicCommentList = XmlReadUtil.getOpinionConentXml(wdoi.getSeismicComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
		   //节能及太阳能专项审查意见
		   List<OpinionConent> specialCommentList = XmlReadUtil.getOpinionConentXml(wdoi.getSpecialComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
		   //绿色建筑审查意见
		   List<OpinionConent> greenCommentList = XmlReadUtil.getOpinionConentXml(wdoi.getGreenComment(), "/PsDataPacket/FDataList/OpinionItem", oc);
		   //本次审查意见结束
		   //封装本次审查意见和上次审查意见到同一个实体中
		   for(ConDrawFirstTrial cdft:conDrawMajor.getCdftList()) {
			   List<Emphasize> emphasizeNewList = new ArrayList<Emphasize>();
			   List<Emphasize> generalCommentNewList = new ArrayList<Emphasize>();
			   List<OpinionConent> finalCommentNewList = new ArrayList<OpinionConent>();
			   List<OpinionConent> seismicCommentNewList = new ArrayList<OpinionConent>();
			   List<OpinionConent> specialCommentNewList = new ArrayList<OpinionConent>();
			   List<OpinionConent> greenCommentNewList = new ArrayList<OpinionConent>();
			 //违反强制性条文封装到实体中
			   for(Emphasize emphasize:emphasizeList) {
				   if(cdft.getGuid().equals(emphasize.getUnitEngineeringInfoGuid())) {
					   emphasizeNewList.add(emphasize);
				   }
			   }
			   cdft.setCheckEmphasizeList(emphasizeNewList);
			 //违反强制性条文结束
			 //违反一般规范条文封装到实体中
			   for(Emphasize generalComment:generalCommentList) {
				   if(cdft.getGuid().equals(generalComment.getUnitEngineeringInfoGuid())) {
					   generalCommentNewList.add(generalComment);
				   }
			   }
			   cdft.setCheckGeneralCommentList(generalCommentNewList);
			 //违反一般规范条文结束
			 //其它意见封装到实体中
			   for(OpinionConent finalComment:finalCommentList) {
				   if(cdft.getGuid().equals(finalComment.getUnitEngineeringInfoGuid())) {
					   finalCommentNewList.add(finalComment);
				   }
			   }
			   cdft.setCheckFinalCommentList(finalCommentNewList);
			 //其它意见结束
			 //抗震专项意见封装到实体中
			   for(OpinionConent seismicComment:seismicCommentList) {
				   if(cdft.getGuid().equals(seismicComment.getUnitEngineeringInfoGuid())) {
					   seismicCommentNewList.add(seismicComment);
				   }
			   }
			   cdft.setCheckSeismicCommentList(seismicCommentNewList);
			 //抗震专项意见结束
			 //节能及太阳能专项审查意见封装到实体中
			   for(OpinionConent specialComment:specialCommentList) {
				   if(cdft.getGuid().equals(specialComment.getUnitEngineeringInfoGuid())) {
					   specialCommentNewList.add(specialComment);
				   }
			   }
			   cdft.setCheckSpecialCommentList(specialCommentNewList);
			 //节能及太阳能专项审查意见结束 
			 //绿色建筑审查意见封装到实体中
			   for(OpinionConent greenComment:greenCommentList) {
				   if(cdft.getGuid().equals(greenComment.getUnitEngineeringInfoGuid())) {
					   specialCommentNewList.add(greenComment);
				   }
			   }
			   cdft.setCheckGreenCommentList(greenCommentNewList);
			 //绿色建筑审查意见结束
		   }
		   //本次实体中，本次审查意见是check开头的字段，上次的是没有check开头的字段
		   mmap.put("conDrawMajor", conDrawMajor);
		   return journalPrefix + "/reviewOpinions";
		   //页面已接入
	   }else if(StrUtil.containsIgnoreCase(wdoi.getState(), "整改后重新上报") && "整改上报退回".equals(wdoi.getRole())) {
		   return journalPrefix + "/rectificationOpinions";
	   }
	   return null;
   }
   
   /**
    * @Title: ConDrawFirstTrialEntity
    * @Description: 封装ConDrawFirstTrial施工图神审查日志实体类
    * @Author wtj
    * @DateTime 2020-10-20 17:47:40
    * @param projectGuid
    * @return
    */
   public List<ConDrawFirstTrial> ConDrawFirstTrialEntity(String projectGuid,ConDrawing cd) {
	   List<ConDrawFirstTrial> cdftList = new ArrayList<ConDrawFirstTrial>();
	   ChildTokens ct = new ChildTokens();
	   ct.setGuid("Guid");
	   ct.setName("Name");
	   String nodePathOne = "/PsDataPacket/FDataList/WDToken";
	   List<ChildTokens> ctList = XmlReadUtil.getChildTokens(cd.getChildTokens(), nodePathOne, ct);
	   if(StringUtils.isEmpty(ctList)) {
		   throw new LSBusinessException("数据获取不正确，请确认选择的是否正确");
	   }
	   for(ChildTokens cts:ctList) {
		   ConDrawFirstTrial cdft = new ConDrawFirstTrial();
		   cdft.setGuid(cts.getGuid());
		   cdft.setEngineeringName(cts.getName());
		   cdftList.add(cdft);
	   }
	   RelatedDesignUnits rdu=new RelatedDesignUnits();
	   rdu.setGuid("Guid");
	   rdu.setName("Name");
	   rdu.setLinkMan("LinkMan");
	   rdu.setLinkTel("LinkTel");
	   rdu.setLinkEMail("LinkEMail");
	   rdu.setDesignContractAmount("DesignContractAmount");
	   rdu.setLeadMan("LeadMan");
	   rdu.setCertLevel("CertLevel");
	   rdu.setCertNum("CertNum");
	   rdu.setPerforms("Performs");
	   rdu.setPerformsIDCard("PerformsIDCard");
	   rdu.setProjectDir("ProjectDir");
	   rdu.setProjectDirIDCard("ProjectDirIDCard");
	   rdu.setDean("Dean");
	   rdu.setDeanIDCard("DeanIDCard");
	   String nodePath = "/PsDataPacket/FDataList/RelevantUnit";
	   List<RelatedDesignUnits> rduList = XmlReadUtil.getRelatedDesignUnitsXml(cd.getRelatedDesignUnits(), nodePath, rdu);
	   for(ConDrawFirstTrial cdft:cdftList) {
		   cdft.setDesignUnit(rduList.get(0).getName());
	   }
	   return cdftList;
   }
   
   /**
    * @Title: ConDrawMajorEntity
    * @Description: 封装ConDrawMajor实体
    * @Author wtj
    * @DateTime 2020-10-29 10:24:36
    * @param cdmList技术负责人审核意见对象集合
    * @param cdmCheckList审查人员审查意见对象集合
    * @return
    */
   public List<ConDrawMajor> ConDrawMajorEntity(List<ConDrawMajor> cdmList,List<ConDrawMajor> cdmCheckList){
	   for(ConDrawMajor cdm:cdmList) {
		   for(ConDrawMajor cdmCheck:cdmCheckList) {
			   if(cdm.getMajor().equals(cdmCheck.getMajor())) {
				   for(ConDrawFirstTrial cdft:cdm.getCdftList()) {
					   for(ConDrawFirstTrial cdftCheck:cdmCheck.getCdftList()) {
						   if(cdft.getGuid().equals(cdftCheck.getGuid())) {
							   cdft.setCheckEmphasizeList(cdftCheck.getCheckEmphasizeList());
							   cdft.setCheckFinalCommentList(cdftCheck.getCheckFinalCommentList());
							   cdft.setCheckGeneralCommentList(cdftCheck.getCheckGeneralCommentList());
							   cdft.setCheckGreenCommentList(cdftCheck.getCheckGreenCommentList());
							   cdft.setCheckSeismicCommentList(cdftCheck.getCheckSeismicCommentList());
							   cdft.setCheckSpecialCommentList(cdftCheck.getCheckSpecialCommentList());
						   }
					   }
				   }
			   }
		   }
	   }
	   return cdmList;
   }
   
   /**
    * @Title: filePath
    * @Description: 封装文件路径，在实体属性AcceName中
    * @Author wtj
    * @DateTime 2020-11-10 16:42:51
    * @param cdmList
    * @return
    */
   public List<ConDrawMajor> filePath(List<ConDrawMajor> cdmList) {
	   if(StringUtils.isNotEmpty(cdmList)) {
		   for(ConDrawMajor cdm:cdmList) {
			   if(StringUtils.isNotEmpty(cdm.getCdftList())) {
				   for(ConDrawFirstTrial cdft:cdm.getCdftList()) {
					   if(StringUtils.isNotNull(cdft.getAffix())) {
						   String file = FieldStrUtils.fileField(cdft.getAffix().getAcceName());
						   cdft.getAffix().setAcceName(file);
					   }
					   if(StringUtils.isNotNull(cdft.getAffixed())) {
						   String file = FieldStrUtils.fileField(cdft.getAffixed().getAcceName());
						   cdft.getAffixed().setAcceName(file);
					   }
				   }
			   }
		   }
	   }
	   return cdmList;
   }
   
   /**
    * @Title: packageConDrawMajor
    * @Description: 封装ConDrawMajor
    * @Author wtj
    * @DateTime 2020-11-17 14:46:42
    * @param cdmCheckList要往该集合添加
    * @param cdmCheck准备添加的实体
    */
   public void packageConDrawMajor(List<ConDrawMajor> cdmCheckList,ConDrawMajor cdmCheck) {
	   boolean is = false;
	   for(ConDrawMajor conDrawMajorCheck:cdmCheckList) {
		   if(conDrawMajorCheck.getMajor().equals(cdmCheck.getMajor())) {
			   is = true;
			   break;
		   }
	   }
	   if(is) {
		   for(ConDrawMajor conDrawMajorCheck:cdmCheckList) {
			   if(conDrawMajorCheck.getMajor().equals(cdmCheck.getMajor())) {
				   for(ConDrawFirstTrial cdft:conDrawMajorCheck.getCdftList()) {
					   for(ConDrawFirstTrial cdftNew:cdmCheck.getCdftList()) {
						   if(cdft.getGuid().equals(cdftNew.getGuid())) {
							   if(StringUtils.isNotEmpty(cdft.getCheckEmphasizeList())) {
								   for(Emphasize checkEmphasize:cdftNew.getCheckEmphasizeList()) {
									   cdft.getCheckEmphasizeList().add(checkEmphasize);
								   }
								}else if(StringUtils.isEmpty(cdft.getCheckEmphasizeList())) {
								   cdft.setCheckEmphasizeList(cdftNew.getCheckEmphasizeList());
								}
							   
							   if(StringUtils.isNotEmpty(cdft.getCheckGeneralCommentList())) {
								   for(Emphasize checkGeneralComment:cdftNew.getCheckGeneralCommentList()) {
									   cdft.getCheckGeneralCommentList().add(checkGeneralComment);
								   }
								}else if(StringUtils.isEmpty(cdft.getCheckGeneralCommentList())) {
								   cdft.setCheckGeneralCommentList(cdftNew.getCheckGeneralCommentList());
								}
							   
							   if(StringUtils.isNotEmpty(cdft.getCheckFinalCommentList())) {
								   for(OpinionConent checkFinalComment:cdftNew.getCheckFinalCommentList()) {
									   cdft.getCheckFinalCommentList().add(checkFinalComment);
								   }
								}else if(StringUtils.isEmpty(cdft.getCheckFinalCommentList())) {
								   cdft.setCheckFinalCommentList(cdftNew.getCheckFinalCommentList());
								}
							   
							   if(StringUtils.isNotEmpty(cdft.getCheckSeismicCommentList())) {
								   for(OpinionConent checkSeismicComment:cdftNew.getCheckSeismicCommentList()) {
									   cdft.getCheckSeismicCommentList().add(checkSeismicComment);
								   }
								}else if(StringUtils.isEmpty(cdft.getCheckSeismicCommentList())) {
								   cdft.setCheckSeismicCommentList(cdftNew.getCheckSeismicCommentList());
								}
							   
							   if(StringUtils.isNotEmpty(cdft.getCheckSpecialCommentList())) {
								   for(OpinionConent checkSpecialComment:cdftNew.getCheckSpecialCommentList()) {
									   cdft.getCheckSpecialCommentList().add(checkSpecialComment);
								   }
								}else if(StringUtils.isEmpty(cdft.getCheckSpecialCommentList())) {
								   cdft.setCheckSpecialCommentList(cdftNew.getCheckSpecialCommentList());
								}
							   
							   if(StringUtils.isNotEmpty(cdft.getCheckGreenCommentList())) {
								   for(OpinionConent checkGreenComment:cdftNew.getCheckGreenCommentList()) {
									   cdft.getCheckGreenCommentList().add(checkGreenComment);
								   }
								}else if(StringUtils.isEmpty(cdft.getCheckGreenCommentList())) {
								   cdft.setCheckGreenCommentList(cdftNew.getCheckGreenCommentList());
								}
						   }
					   }
				   }
			   }
		   }
	   }else {
		   cdmCheckList.add(cdmCheck);
	   }
   }
}
